package com.yitiao.multithread.ticket;

public class SellTicket {
    private int number = 50;

    public synchronized void sale() {
        if (number > 0) {
            System.out.println(Thread.currentThread().getName() + "\t" + "---卖出第： " + (number--));
        }
    }

}
